[Observability] Expose CallerDetails on ExecuteTool and Inference scopes.#204
Merged
[Observability] Expose CallerDetails on ExecuteTool and Inference scopes.#204
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes CallerDetails (non-agentic caller identity metadata) on the ExecuteTool and Inference tracing scopes and ensures the same metadata flows into ETW/exporter payloads and DTO builders, with corresponding test coverage.
Changes:
- Add optional
callerDetailspropagation intoInferenceScopeandExecuteToolScope(viaOpenTelemetryScope). - Extend ETW logging and DTO builders to include caller attributes (id/name/upn/client ip/tenant id).
- Add/extend unit and integration tests validating caller tags/attributes across tracing, ETW, and exporter paths.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Observability/Runtime/Tracing/Scopes/OpenTelemetryScope.cs | Centralizes setting caller tags for all derived scopes via a new optional constructor parameter. |
| src/Observability/Runtime/Tracing/Scopes/InvokeAgentScope.cs | Removes duplicated caller-tag logic and forwards callerDetails into the base scope. |
| src/Observability/Runtime/Tracing/Scopes/InferenceScope.cs | Adds callerDetails to Start and forwards to OpenTelemetryScope for tag emission. |
| src/Observability/Runtime/Tracing/Scopes/ExecuteToolScope.cs | Adds callerDetails to Start and forwards to OpenTelemetryScope for tag emission. |
| src/Observability/Runtime/Etw/IA365EtwLogger.cs | Extends ETW logging interface methods to accept optional callerDetails. |
| src/Observability/Runtime/Etw/A365EtwLogger.cs | Passes callerDetails into DTO builders for ETW serialization. |
| src/Observability/Runtime/DTOs/Builders/ExecuteToolDataBuilder.cs | Adds caller attributes into execute_tool DTO attributes. |
| src/Observability/Runtime/DTOs/Builders/ExecuteInferenceDataBuilder.cs | Adds caller attributes into inference DTO attributes. |
| src/Observability/Runtime/DTOs/Builders/BaseDataBuilder.cs | Treats caller client IP as reserved and emits it from CallerDetails. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Scopes/InferenceScopeTest.cs | New test asserting caller tags are set when provided. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Scopes/ExecuteToolScopeTest.cs | New test asserting caller tags are set when provided. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Etw/EtwLoggingBuilderTests.cs | Extends ETW builder tests to validate caller attributes in emitted payload. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteToolDataBuilderTests.cs | Extends DTO builder tests to validate caller attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/DTOs/Builders/ExecuteInferenceDataBuilderTests.cs | Extends DTO builder tests to validate caller attributes. |
| src/Tests/Microsoft.Agents.A365.Observability.Runtime.IntegrationTests/Agent365ExporterE2ETests.cs | Extends exporter E2E assertions to validate caller attributes are exported. |
Comments suppressed due to low confidence (1)
src/Observability/Runtime/Etw/IA365EtwLogger.cs:59
- This file is missing the standard Microsoft copyright header at the top (other files in this folder include it, e.g.,
A365EtwLogger.cs). Since this file is being modified, please add the required header to align with repository conventions.
public void LogInferenceCall(
InferenceCallDetails inferenceCallDetails,
AgentDetails agentDetails,
TenantDetails tenantDetails,
string conversationId,
fpfp100
approved these changes
Feb 10, 2026
nikhilNava
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.